//
//  segmentDownloadManage.h
//  LocalHttpServerExample
//
//  Created by Lin Eidan on 13-9-6.
//  Copyright (c) 2013年 taomee. All rights reserved.
//

#import <Foundation/Foundation.h>
@class VideoObj;

@protocol SegmentDownloadManageDelegate;

@interface SegmentDownloadManage : NSObject

@property(strong, nonatomic) NSString *downloadUrl;
@property(strong, nonatomic) NSString *fileName;
@property(strong, nonatomic) NSString *saveToPath;
@property(assign, nonatomic) float segmentDur;



@property(assign, nonatomic) float timeProgess;  //已经下载了多少s。
@property(weak, nonatomic) id<SegmentDownloadManageDelegate>delegate;

-(id)initWithDownloadURL:(NSString *)url andFileName:(NSString *)fileName andSaveToPath:(NSString *)saveToFolder andFileDur:(float )fileDur andVideoObj:(VideoObj *)obj;
-(void)startSegmentDownload;

@end

@protocol SegmentDownloadManageDelegate <NSObject>

@optional
-(void)segmentDownloadManageFinish:(SegmentDownloadManage *)segmentDownloadManage andSegmentDur:(float)segmentDur andIsSuccess:(BOOL)isSuccess;

@end
